#include "fwdt_drv.h"
//#include "cs32f0xx_fwdt.h
#include "main.h"

IWDG_HandleTypeDef   IwdgHandle;


void fwdt_drv_wdt_init(void)
{
  
     IwdgHandle.Instance = IWDG;
     IwdgHandle.Init.Prescaler = IWDG_PRESCALER_256;//T=1MS
     IwdgHandle.Init.Reload = (4094);              //1ms*1000=1s
     IwdgHandle.Init.Window = IWDG_WINDOW_DISABLE;
     HAL_IWDG_Init(&IwdgHandle);
}


void fwdt_drv_feed_wdt(void)
{
   HAL_IWDG_Refresh(&IwdgHandle);
   
}

